import config from "@/config"
import http from "@/utils/request"

export default {
    // 生产
    production: {
		list: {
			url: `${config.API_URL}/adminapi/productionall.ProductionMachin/lists`,
			name: "获取生产加工单",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/productionall.ProductionMachin/add`,
			name: "添加生产加工单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/productionall.ProductionMachin/edit`,
			name: "编辑生产加工单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/productionall.ProductionMachin/delete`,
			name: "删除生产加工单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/productionall.ProductionMachin/detail`,
			name: "生产加工单详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        update_status: {
			url: `${config.API_URL}/adminapi/productionall.ProductionMachin/updateStatus`,
			name: "生产加工单 -- 修改状态",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		dataReport: {
			url: `${config.API_URL}/adminapi/productionall.ProductionMachin/dataReport`,
			name: "生产排单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 生产入库
    inhouse: {
		list: {
			url: `${config.API_URL}/adminapi/productionall.ProductionWare/lists`,
			name: "获取生产入库单",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/productionall.ProductionWare/add`,
			name: "添加生产入库单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/productionall.ProductionWare/edit`,
			name: "编辑生产入库单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/productionall.ProductionWare/delete`,
			name: "删除生产入库单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/productionall.ProductionWare/detail`,
			name: "生产入库单详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        update_status: {
			url: `${config.API_URL}/adminapi/productionall.ProductionWare/updateStatus`,
			name: "生产入库单 -- 审核",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 生产退库
    outhouse: {
		list: {
			url: `${config.API_URL}/adminapi/productionall.ProductionRetreat/lists`,
			name: "获取生产退库单",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/productionall.ProductionRetreat/add`,
			name: "添加生产退库单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/productionall.ProductionRetreat/edit`,
			name: "编辑生产退库单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/productionall.ProductionRetreat/delete`,
			name: "删除生产退库单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/productionall.ProductionRetreat/detail`,
			name: "生产退库单详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        update_status: {
			url: `${config.API_URL}/adminapi/productionall.ProductionRetreat/updateStatus`,
			name: "生产退库单 -- 审核",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 工序计划单
    processplan: {
		list: {
			url: `${config.API_URL}/adminapi/productionplan.WorkPlan/lists`,
			name: "获取工序计划单",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/productionall.ProductionWare/add`,
			name: "添加工序计划单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/productionall.ProductionWare/edit`,
			name: "编辑工序计划单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/productionall.ProductionWare/delete`,
			name: "删除工序计划单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/productionall.ProductionWare/detail`,
			name: "工序计划单详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        updateStatus: {
			url: `${config.API_URL}/adminapi/productionplan.WorkPlan/updateStatus`,
			name: "工序计划单 -- 切换状态",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 报工
    report: {
		list: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWork/lists`,
			name: "获取报工",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWork/add`,
			name: "添加报工",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWork/edit`,
			name: "编辑报工",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWork/delete`,
			name: "删除报工",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWork/detail`,
			name: "报工详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 转出
    turn:{
        url: `${config.API_URL}/adminapi/productionplan.WorkPlan/updateStaff`,
        name: "转出",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    // 报工工时
    processtime: {
		list: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWorkTime/lists`,
			name: "获取工序计划单",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWorkTime/add`,
			name: "添加工序计划单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWorkTime/edit`,
			name: "编辑工序计划单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWorkTime/delete`,
			name: "删除工序计划单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWorkTime/detail`,
			name: "工序计划单详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 请检单
    checkorder: {
		list: {
			url: `${config.API_URL}/adminapi/quality.CheckForm/lists`,
			name: "获取请检单",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/quality.CheckForm/check`,
			name: "请检单 -- 发起检验",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/quality.QualityCheck/delete`,
			name: "删除请检单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/quality.CheckForm/detail`,
			name: "请检单详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
	},
    // 检验单
    check: {
		list: {
			url: `${config.API_URL}/adminapi/quality.QualityCheck/lists`,
			name: "获取检验单",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/quality.QualityCheck/add`,
			name: "添加检验单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/quality.QualityCheck/edit`,
			name: "编辑检验单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/quality.QualityCheck/delete`,
			name: "删除检验单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/quality.QualityCheck/detail`,
			name: "检验单详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 检验单加不良品数
    checknum: {
		list: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWorkRejects/lists`,
			name: "获取检验单",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWorkRejects/add`,
			name: "添加不良品 -- 数量",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWorkRejects/edit`,
			name: "编辑不良品 -- 数量",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWorkRejects/delete`,
			name: "删除不良品 -- 数量",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/productionplan.ApplyWorkRejects/detail`,
			name: "不良品 -- 数量详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 方案
    programme: {
		list: {
			url: `${config.API_URL}/adminapi/quality.QualityProgramme/lists`,
			name: "获取方案",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/quality.QualityProgramme/add`,
			name: "添加方案",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/quality.QualityProgramme/edit`,
			name: "编辑方案",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/quality.QualityProgramme/delete`,
			name: "删除方案",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/quality.QualityProgramme/detail`,
			name: "方案详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        update_status: {
			url: `${config.API_URL}/adminapi/quality.QualityProgramme/updateStatus`,
			name: "方案审核",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 方案分类
    proType: {
		list: {
			url: `${config.API_URL}/adminapi/quality.QualityCategory/lists`,
			name: "获取方案分类",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/quality.QualityCategory/add`,
			name: "添加方案分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/quality.QualityCategory/edit`,
			name: "编辑方案分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/quality.QualityCategory/delete`,
			name: "删除方案分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 检验项
    item: {
		list: {
			url: `${config.API_URL}/adminapi/quality.CheckProject/lists`,
			name: "获取检验项",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/quality.CheckProject/add`,
			name: "添加检验项",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/quality.CheckProject/edit`,
			name: "编辑检验项",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/quality.CheckProject/delete`,
			name: "删除检验项",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/quality.CheckProject/detail`,
			name: "检验项详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    // 检验项分类
    itemType: {
		list: {
			url: `${config.API_URL}/adminapi/quality.CheckProjectGroup/lists`,
			name: "获取检验项分类",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/quality.CheckProjectGroup/add`,
			name: "添加检验项分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/quality.CheckProjectGroup/edit`,
			name: "编辑检验项分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/quality.CheckProjectGroup/delete`,
			name: "删除检验项分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
}
